//
//  Recommend1TableViewCell.m
//  FlyGift
//
//  Created by lanou3g on 15/7/16.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "Recommend1TableViewCell.h"

@implementation Recommend1TableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        self.myImageView = [[UIImageView alloc]initWithFrame:CGRectMake(kP6width(8), kP6Height(8), kScreenWidth-16, kP6Height(180-8))];
        CALayer *lay  = _myImageView.layer;//获取ImageView的层
        [lay setMasksToBounds:YES];
        [lay setCornerRadius:5.0];//值越大，角度越圆
        [self.contentView addSubview:_myImageView];
        
        self.label = [[UILabel alloc]initWithFrame:CGRectMake(kP6width(5), kP6Height(180-40), kScreenWidth-26, kP6Height(30))];
        _label.text = @"每日10件美好小物送给自己:第888期";
        _label.textColor = [UIColor whiteColor];
        _label.textAlignment = NSTextAlignmentCenter;
        [_myImageView addSubview:_label];
        
        
        UIView *view = [[UIView alloc]initWithFrame:CGRectMake(kP6width(-5), 0, kScreenWidth-16, kP6Height(180-8))];
        view.backgroundColor = [UIColor grayColor];
        view.alpha = 0.3;
        [_label addSubview:view];
        
        
        self.myView = [[UIView alloc]initWithFrame:CGRectMake(kScreenWidth-90, kP6Height(10), kP6width(70), kP6Height(20))];
        _myView.backgroundColor = [UIColor grayColor];
        _myView.layer.masksToBounds = YES;
        _myView.layer.cornerRadius = _myView.bounds.size.height / 2;
        [self.contentView addSubview:_myView];
        
        
        self.button = [UIButton buttonWithType:UIButtonTypeSystem];
        _button.frame = CGRectMake(kP6width(5), kP6Height(2), kP6width(16), kP6Height(16));
        [_button setBackgroundImage:[UIImage imageNamed:@"like_press@2x"] forState:UIControlStateNormal];
        [_myView addSubview:_button];
        
        
        self.number = [[UILabel alloc]initWithFrame:CGRectMake(kP6width(18), kP6Height(4), kP6width(50), kP6Height(12))];
        _number.text = @"88888";
        _number.textColor = [UIColor whiteColor];
        _number.font = [UIFont systemFontOfSize:10];
        _number.textAlignment = NSTextAlignmentCenter;
        [_myView addSubview:_number];
        
        
    }
    return self;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
